<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改人员信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-renyuanxinxi-edit" th:object="${bizRenyuanxinxi}">
            <input name="sn" th:field="*{sn}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">人员编号：</label>
                    <div class="col-sm-8">
                        <input name="renyuanbianhao" th:field="*{renyuanbianhao}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">姓名：</label>
                    <div class="col-sm-8">
                        <input name="xingming" th:field="*{xingming}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">性别：</label>
                    <div class="col-sm-8">
                        <div class="radio-box" th:each="dict : ${@dict.getType('sys_user_sex')}">
                            <input type="radio" th:id="${'xingbie_' + dict.dictCode}" name="xingbie" th:value="${dict.dictValue}" th:field="*{xingbie}">
                            <label th:for="${'xingbie_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">身份证号：</label>
                    <div class="col-sm-8">
                        <input name="shenfenzhenghao" th:field="*{shenfenzhenghao}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">所在部门：</label>
                    <div class="col-sm-8">
                        <select name="suozaibumen" class="form-control" th:with="type=${@dict.getType('dic_dept')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{suozaibumen}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">专业职称：</label>
                    <div class="col-sm-8">
                        <input name="zhuanyezhicheng" th:field="*{zhuanyezhicheng}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">人员职务：</label>
                    <div class="col-sm-8">
                        <input name="renyuanzhiwu" th:field="*{renyuanzhiwu}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">人员级别：</label>
                    <div class="col-sm-8">
                        <input name="renyuanjibie" th:field="*{renyuanjibie}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">调入日期：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="diaoruriqi" th:value="${#dates.format(bizRenyuanxinxi.diaoruriqi, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">人员状态：</label>
                    <div class="col-sm-8">
                        <div class="radio-box" th:each="dict : ${@dict.getType('dic_person_status')}">
                            <input type="radio" th:id="${'renyuanzhuangtai_' + dict.dictCode}" name="renyuanzhuangtai" th:value="${dict.dictValue}" th:field="*{renyuanzhuangtai}">
                            <label th:for="${'renyuanzhuangtai_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/renyuanxinxi";
        $("#form-renyuanxinxi-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-renyuanxinxi-edit').serialize());
            }
        }

        $("input[name='diaoruriqi']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>